import Vue from 'vue'
import Vuex from 'vuex'


Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    proList:[
      {
        name:"龙蛋",
        url:"http://www.zishayy.com/UserFiles/shopsimg2/12543.jpg",
        detailList:[
          "http://www.zishayy.com/UserFiles/shopsimg/125431.jpg",
          "http://www.zishayy.com/UserFiles/shopsimg/125432.jpg",
          "http://www.zishayy.com/UserFiles/shopsimg/125433.jpg",
          "http://www.zishayy.com/UserFiles/shopsimg/125434.jpg",
        ],
        price: "99.00",
        num: 2
      },
      {
        name:"香梅三式",
        url:"http://www.zishayy.com/UserFiles/shopsimg2/12538.jpg",
        detailList:[
          "http://www.zishayy.com/UserFiles/shopsimg/125382.jpg",
          "http://www.zishayy.com/UserFiles/shopsimg/125383.jpg",
          "http://www.zishayy.com/UserFiles/shopsimg/125384.jpg",
          "http://www.zishayy.com/UserFiles/shopsimg/125385.jpg",
        ],
        price: "199.00",
        num: 1
      },
    ],
    isLogin: false//用户登录状态
  },
  mutations: {
    add: function (state,product){
      state.proList.push(product);//添加新商品
    },

  },
  actions: {

  },
  modules: {
  }
})
